#!/bin/bash
#this file stats the outlink of every questions
if [ $# -lt 1 ] 
then
    echo "Usage: ./stat_out_link.sh srcFile";
    echo "File structure:"
    echo "id1""\t""id2,id3,id4"
    exit 1;
else
    src_file=$1
fi

awk '{
    qNum = split($2, relates, ",");
    print $1,qNum;
}
END {
}' $src_file
